package cn.ghb.demo.sys.user.controller;

import cn.ghb.demo.sys.user.pojo.UserInfo;
import cn.ghb.demo.sys.user.service.UserInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @author HongbinGao
 */
@RestController
@RequestMapping(path = "/sys/user")
public class UserInfoController {

    private final UserInfoService service;

    @Autowired
    public UserInfoController(UserInfoService service) {
        this.service = service;
    }

    @PostMapping(path = "/save")
    public boolean save(@RequestBody UserInfo userInfo) {
        return service.save(userInfo);
    }

}
